const app = getApp()
const Api = require('../../../utils/api.js')

Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		dynamic: {}
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad (options) {
		this.getDyanmic(options.id)
	},

	getDyanmic(id) {
		app.get(Api.dynamic.item, {
			id
		}).then(res => {
			res.code === 1 && this.setData({
				dynamic: res.data
			})
		})
	},

})